<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>100教程网_100教程网_国内最多最全的免费电子书库_格式为epub+mobi+azw3_免费使用</title>
    <link rel="stylesheet" href="bootstrap-4.1.3-dist/css/bootstrap.css">
    <link rel="stylesheet" href="validator/css/bootstrapValidator.css">
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <script src="bootstrap-4.1.3-dist/js/bootstrap.js"></script>
    <script src="validator/js/bootstrapValidator.js"></script>
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/registe.css">
    <script src="validator/js/language/zh_CN.js"></script>
</head>
<body>
<div class="container">
    <!-- <div class="row header-top">
         <div class="col">
         </div>
     </div>--><!--预留最上顶部位-->
    <div class="row header-middle">
        <div class="col-md-3">
            <a class="navbar-brand" href="/">
                <img src="images/logo.png"/>
            </a>
        </div>

        <div class="col-md-6">
            <form class="bs-example bs-example-form" role="form">
                <div class="input-group mb-3">
                    <input type="text" class="form-control" placeholder="请输入书名/作者">
                    <span class="input-group-btn">
                            <button class="btn btn-default input-group-text" type="button">搜索</button>
                        </span>

                </div><!-- /input-group -->
            </form>
        </div>
        <!-- <div class="col">
             用户登陆部位
         </div>-->
    </div>
    <div class="row public-nav">
        <div class="col-md-12">
            <nav class="navbar navbar-expand-lg navbar-light bg-light">
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
                    <div class="navbar-nav">
                        <a class="nav-item  active" href="#">首页 </a>
                        <a class="nav-item " href="#">编程开发</a>
                        <a class="nav-item " href="#">Pricing</a>
                        <a class="nav-item" href="#">Disabled</a>
                    </div>
                </div>
            </nav>
        </div>
    </div><!--导航end-->
    <div class="row">
      <div class="col-md-2"></div>
      <div class="col-md-8 login-col">
          <ul class="login-tabs">
              <li><a href="login.html">登 陆</a></li>
              <li class="active"><a href="javascript:void(0)">注 册</a></li>
          </ul>
          <div class="tab-content login-tab-c">
              <form class="form-horizontal" role="form" id="regist-form">
                  <div class="form-group row">
                      <label for="tel" class="col-sm-3 control-label">手机号</label>
                      <div class="col-sm-6">
                          <input type="text" class="form-control" id="tel" name="tel">
                      </div>
                      <div class="col-sm-3">
                          <div class="invalid-feedback"></div>
                      </div>
                  </div>
                  <div class="form-group row">
                      <label for="codeimg" class="col-sm-3 control-label">图形码</label>
                      <div class="col-sm-6">
                          <input type="text" class="form-control" id="codeimg" name="codeimg" placeholder="请输入图形码">
                      </div>
                      <div class="col-sm-3 ">
                          <span class="codebox">xlyc</span>
                      </div>
                  </div>
                  <div class="form-group row">
                      <label for="megcode" class="col-sm-3 control-label">验证码</label>
                      <div class="col-sm-6">
                          <input type="text" class="form-control" id="megcode" name="megcode" placeholder="请输入短信验证码">
                      </div>
                      <div class="col-sm-3">
                          <button type="button" class="btn btn-success btn-sm">获取验证码</button>
                      </div>
                  </div>

                  <div class="form-group row">
                      <label for="password" class="col-sm-3 control-label">密码</label>
                      <div class="col-sm-6">
                          <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码">
                      </div>
                      <div class="col-sm-3">
                      </div>
                  </div>
                  <div class="form-group row">
                      <label for="rpassword" class="col-sm-3 control-label">确认密码</label>
                      <div class="col-sm-6">
                          <input type="password" class="form-control" id="rpassword" name="rpassword" placeholder="请输入密码">
                      </div>
                      <div class="col-sm-3">
                      </div>
                  </div>
                  <div class="form-group row">
                      <div class="col-sm-3"></div>
                      <div class="col-sm-6 sub-btn">
                          <button type="submit" class="btn" id="onsubmit">立即注册</button>
                      </div>
                      <div class="col-sm-3"></div>
                  </div>

              </form>
              <div class="alert-wrap">
                  <div class="alert alert-success alert-dismissable">
                      <button type="button" class="close" data-dismiss="alert"
                              aria-hidden="true">
                          &times;
                      </button>
                      注册成功！
                  </div>
                  <div class="alert alert-warning alert-dismissable">
                      <button type="button" class="close" data-dismiss="alert"
                              aria-hidden="true">
                          &times;
                      </button>
                      注册失败！
                  </div>
              </div>

          </div>
      </div>
      <div class="col-md-2"></div>
    </div>
    <div class="row public-footer">
        <div class="col-md-8">
            <div class="row">
                <div class="col-md-12"> <small>© 2017－2018 100jiaocheng.com, all rights reserved 100教程</small></div>

            </div>
            <div class="row">
                <div class="col-md-12">
                    <p><small>本站资源来源说明：</small></p>
                    <p><small>本站所有资源搜集于互联网，所提供下载链接也是站外链接，网站本身并不存储相关资源文件，如资源下载链接侵犯到版权方，请发送邮件到wjh756381193@qq.com，站长核实后会第一时间移除，谢谢</small></p>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <p style="color:red"><small>书籍投稿：</small></p>
                    <p><small>如果你有书屋没有的电子书想要分享，也可以投稿到邮箱wjh75638118@qq.com。感谢大家</small></p>
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <p>
            </p>
        </div>
    </div>
</div>
<script>
    $(function () {
        //注册验证
      $('#regist-form').bootstrapValidator({
          message: 'This value is not valid',
         /* feedbackIcons: {
              valid: 'glyphicon glyphicon-ok',
              invalid: 'glyphicon glyphicon-remove',
              validating: 'glyphicon glyphicon-refresh'
          },*/
          fields: {
              tel: {
                  message: '请输入正确手机号',
                  validators: {
                      notEmpty: {
                          message: ''
                      },
                      stringLength: {
                          min: 11,
                          max: 11,
                          message: '请输入11位手机号码'
                      },
                      regexp: {
                          regexp: /^1[3|5|8]{1}[0-9]{9}$/,
                          message: '请输入正确的手机号码'
                      }
                  }
              },
              codeimg: {
                  message: '请输入正确的图形码',
                  validators: {
                      notEmpty: {
                          message: ''
                      },
                      stringLength: {
                          min: 4,
                          max: 4,
                          message: '图形码不正确'
                      },
                      regexp: {
                          regexp: /^[\w]{4}$/,
                          message: '请输入正确的图形码'
                      }
                  }
              },
              megcode: {
                  message: '请输入正确的验证码',
                  validators: {
                      notEmpty: {
                          message: ''
                      },
                      stringLength: {
                          min: 4,
                          max: 4,
                          message: '验证码不正确'
                      },
                      regexp: {
                          regexp: /^[\w]{4}$/,
                          message: ''
                      }
                  }
              },
              username: {//验证input项：验证规则
                  message: '请输入用户名',
                  validators: {
                      notEmpty: {
                          message: '用户名不能为空'
                      },
                      stringLength: {
                          max: 30,
                          message: '用户名长度必须在6到30之间'
                      },
                      threshold :  6 , //有6字符以上才发送ajax请求，（input中输入一个字符，插件会向服务器发送一次，设置限制，6字符以上才开始）
                      /*remote: {//ajax验证。server result:{"valid",true or false} 向服务发送当前input name值，获得一个json数据。例表示正确：{"valid",true}
                          url: 'exist2.do',//验证地址
                          message: '用户已存在',//提示消息
                          delay :  2000,//每输入一个字符，就发ajax请求，服务器压力还是太大，设置2秒发送一次ajax（默认输入一个字符，提交一次，服务器压力太大）
                          type: 'POST'//请求方式
                          /!**自定义提交数据，默认值提交当前input value
                           *  data: function(validator) {
                               return {
                                   password: $('[name="passwordNameAttributeInYourForm"]').val(),
                                   whatever: $('[name="whateverNameAttributeInYourForm"]').val()
                               };
                            }
                           *!
                      },*/
                      regexp: {
                          regexp: /^[a-zA-Z0-9_\.]+$/,
                          message: '用户名由数字字母下划线和.组成'
                      }
                  }
              },
              password: {
                  message:'密码无效',
                  validators: {
                      notEmpty: {
                          message: '密码不能为空'
                      },
                      stringLength: {
                          min: 6,
                          max: 30,
                          message: '密码在不能低于6位大于30位字符长'
                      },

                      regexp: {
                          regexp: /^[a-zA-Z0-9_\.]+$/,
                          message: 'The username can only consist of alphabetical, number, dot and underscore'
                      }
                  }
              },
              rpassword: {
                  message: '密码无效',
                  validators: {
                      notEmpty: {
                          message: '密码不能为空'
                      },
                      stringLength: {
                          min: 6,
                          max: 30,
                          message: '密码在不能低于6位大于30位字符长'
                      },
                      identical: {//相同
                          field: 'password',
                          message: '两次密码不一致'
                      },

                      regexp: {//匹配规则
                          regexp: /^[a-zA-Z0-9_\.]+$/,
                          message: 'The username can only consist of alphabetical, number, dot and underscore'
                      }
                  }
              },
          },
      });
      //提交
        $('#onsubmit').click(function () {
            $('#regist-form').bootstrapValidator('validate');
            //成功后
            $(".alert-wrap").show();
            $(".alert-success").show();
        });
        $(".close").click(function () {
           $(".alert-wrap").hide();
        });
    })
</script>
</body>
</html>